import request from './request.js';
let service = request.service;
let formatterUrl = request.formatterUrl;
export default {
  /**系统管理 */
  getMenuAllSrc(menuId) {
    return service({
      url: `/adscm/system/menu/getMenuAllSrc/${menuId}`,
      /**获取菜单权限 */
      method: 'get'
    })
  },
  menuNodeAll(){
    return service({
      url: '/adscm/system/menu/getAllMenu',
      /**获取菜单节点 */
      method: 'get'
    })
  },
  addUpdateMenu(type, data) {
    /**addMenu-新增菜单 editMenu-编辑菜单**/
    return service({
      url: `/adscm/system/menu//${type}`,
      method: 'post',
      data
    })
  },
  deleteMenu(id) {
    /**删除菜单 */
    return service({
      url: `/adscm/system/menu/delMenu/${id}`,
      method: 'post',
    })
  },
  setPwd(id,pwd) {
    /**修改密码 */
    return service({
      url: `/adscm/system/user/editUsersPwd/${id}/${pwd}`,
      method: 'post',
    })
  },
  getAllRoles(){
    /**获取所有角色列表 */
    return service({
      url: `/adscm/system/role/getAllRoles`,
      method: 'post',
    })
  },
  getRoleMenu(id){
    /**根据id获取角色菜单权限列表 */
    return service({
      url: `/adscm/system/menu/getRolesSrc/${id}`,
      method: 'post',
    })
  },
  codeType() {
    return service({
      url: '/adscm/system/codeType/select',
      /**码表列表 */
      method: 'get'
    })
  },
  deleteCode(id) {
    return service({
      url: `/adscm/system/codeType/delete/${id}`,
      /**删除码表 */
      method: 'post'
    })
  },
  insertAndUpdateCode(type, data) {
    return service({
      url: `/adscm/system/codeType/${type}`,
      /**insert-新增 update-编辑 码表 */
      method: 'post',
      data
    })
  },
  subCode(id) {
    return service({
      url: `/adscm/system/code/selectByCodeType/${id}`,
      /**码表参数列表 */
      method: 'post'
    })
  },
  insertAndUpdateSubcode(type, data) {
    return service({
      url: `/adscm/system/code/${type}`,
      /**insert-新增 update-编辑 码表参数 */
      method: 'post',
      data
    })
  },
  deleteSubcode(id) {
    return service({
      url: `/adscm/system/code/delete/${id}`,
      /**删除码表参数 */
      method: 'post'
    })
  },
  /**营运管理 */
  getDoctorData(data) {
    return service({
      url: '/adscm/application/bodyCheck/queryDoctor/',
      /* 医生列表 */
      method: 'get',
      params:data
    })
  },
  getNurseData() {
    return service({
      url: '/adscm/system/user/queryUsersByRoleId/5',
      /* 护士列表 */
      method: 'get'
    })
  },

  getUntreatedData(data) {
    return service({
      url: '/adscm/application/providerCollection/selectNoDealProviderCollection',
      /* 查询未处理采浆记录 */
      method: 'get',
      params:data
    })
  },

  getMachineCodeData() {
    return service({
      url: '/adscm/application/jzMachine/selectUseingMachine',
      /* 分配机列表 */
      method: 'get'
    })
  },

  getCodeData(id) {
    return service({
      url: `/adscm/system/code/selectByCodeType/${id}`,
      /* 码表列表 by id*/
      method: 'get'
    })
  },
  getVideoByType(data) {
    return service({
      url: `/adscm/application/providerCollVideo/getCollVideo`,
      /* 码表列表 by id*/
      method: 'get',
      params:data
    })
  },
  getCodeDataByCodeType(codeType) {
    return service({
      url: `/adscm/system/code/queryCoedByType/${codeType}`,
      /* 码表列表 by类型 */
      method: 'get'
    })
  },
  getMachineData() {
    return service({
      url: `/adscm/application/jzMachine/selectUseingMachine`,
      /* 机器编号列表 */
      method: 'get'
    })
  },
  login(data) {
    return service({
      url: `/authentication/form`, //登录接口
      method: 'post',
      params: data
    })
  },
  loginOut() {
    return service({
      url: `/adscm/logout`, //退出登录
      method: 'get'
    })
  },
  providerInfo(data) {
    return service({
      url: `/adscm/application/providerInfo/selectProviderInfo`, //获取建档记录列表
      method: 'post',
      data
    })
  },
  addUpdataProviderInfo(type,data) {
    /**insertProviderInfo-新增 updateProviderInfo-编辑 建档记录 */
    return service({
      url: `/adscm/application/providerInfo/${type}`,
      method: 'post',
      data
    })
  },
  addUpdataCheckBodyInfo(data) {
    /**addUpdataCheckBodyInfo-编辑 体检报告*/
    return service({
      url: `/adscm/application/bodyCheck/update`,
      method: 'post',
      data
    })
  },
  addUpdataUntreatedInfo(data) {
    /**addUpdataUntreatedInfo-编辑 未采浆记录*/
    return service({
      url: `/adscm/application/providerCollection/updateNoDealProviderCollection`,
      method: 'post',
      data
    })
  },
  addUpdataCheckRecordInfo(data) {
    /**addUpdataCheckRecordInfo-编辑 检验记录*/
    return service({
      url: `/adscm/application/plasmaSamples/update`,
      method: 'post',
      data
    })
  },
  addUpdataProviderCostInfo(data) {
    /**addUpdataProviderCostInfo-编辑 （未）处理费用记录*/
    return service({
      url: `/adscm/application/providerCost/update`,
      method: 'post',
      data
    })
  },
  addUpdataUserInfo(url,data) {
    /**saveOrUpdateUsersMsg- 进行用户数据queryLog */
    return service({
      url: url,
      method: 'post',
      data
    })
  },
  idImgUpload(){
    /**身份证图片上传 */ 
    return formatterUrl({
      url: '/adscm/filesystem/abc'
    })
  },
  getchemicalList(id) {
    /**根据浆员id获取化检信息列表 */
    return service({
      url: `/adscm/application/plasmaSamples/selectPlasmaSampleByProviderNo/${id}`,
      method: 'get',
    })
  },
 getFingerPrintList(id) {
  /**根据浆员id获取指纹信息列表 */
  return service({
    url: `/adscm/application/providerZw/selectByProviderNo/${id}`,
    method: 'get',
  })
 },
 xpList(id){
   /**根据浆员id获取胸片信息列表 */
   return service({
     url: `/adscm/application/providerXp/selectByProviderNo/${id}`,
     method: 'get',
   })
 },
 insertUpdataXp(type,data){
   /**修改-updata 新增-insert 胸片信息*/
   return service({
     url: `/adscm/application/providerXp/${type}`,
     method: 'post',
     data
   })
 },
  basicInfo(data) {
    return service({
      url: '/adscm/application/bodyCheck/bodyCheckInfo', //浆员基本信息
      method: 'get',
      params: data
    })
  },
  queryLog(data,current,size) {
    return service({
      url: '/adscm/system/log/allLog/'+current+'/'+size, //查询日志信息
      method: 'get',
      params: data
    })
  },
  providerReg(data) {
    return service({
      url: '/adscm/application/providerReg/select', //获取登记记录列表
      method: 'post',
      data
    })
  },
  bodyCheckTime(data) {
    return service({
      url: '/adscm/application/bodyCheck/queryByTime', //获取体检记录列表
      method: 'get',
      params: data
    })
  },
  providerAllot(data) {
    return service({
      url: '/adscm/application/providerAllot/select', //获取分配记录列表
      method: 'post',
      data
    })
  },
  queryByPNoAndMNo(data) {
    return service({
      url: '/adscm/application/heatSeal/queryByPNoAndMNo', //获取热合记录列表
      method: 'get',
      params: data
    })
  },
  queryByCardId(data) {
    return service({
      url: '/adscm/application/heatSeal/queryByCardId', //通过卡号获取对应卡号热合记录
      method: 'get',
      params: data
    })
  },
  queryProviderCost(data) {
    return service({
      url: '/adscm/application/providerCost/select', //获取费用（未）处理记录
      method: 'get',
      params: data
    })
  },
  singleHeatseal(data) {
    return service({
      url: '/adscm/application/heatSeal/queryById', //当个热合记录查找
      method: 'get',
      params: data
    })
  },
  heatSealUpdate(data) {
    return service({
      url: '/adscm/application/heatSeal/update', //热合记录修改
      method: 'post',
      data
    })
  },
  heatSealPrint(data) {
    return service({
      url: '/javaPrint/heatSealPrint', //打印
      method: 'post',
      data
    },'print')
  },
  boxConfList() {
    return service({
      url: '/adscm/application/heatSeal/boxConf/query', //装箱单列表
      method: 'get',
    })
  },
  addBoxConf(data) {
    return service({
      url: '/adscm/application/heatSeal/boxConf/insert', //新增装箱单配置
      method: 'post',
      data
    })
  },
  updateBoxConf(data) {
    return service({
      url: '/adscm/application/heatSeal/boxConf/update', //修改装箱单配置
      method: 'post',
      data
    })
  },
  deleteBoxConf(data) {
    return service({
      url: '/adscm/application/heatSeal/boxConf/delete', //删除装箱单配置
      method: 'get',
      params: data
    })
  },
  providerCollectionList(data) {
    return service({
      url: '/adscm/application/providerCollection/selectProviderCollection', //获取采浆记录列表
      method: 'post',
      data
    })
  },
  providerCollectionSelectById(id) {
    return service({
      url: `/adscm/application/providerCollection/selectById/${id}`, //根据id查询采浆概要信息
      method: 'get'
    })
  },
  provisionConsumable(data) {
    return service({
      url: `/adscm/application/providerCollection/select/provisionConsumable/selectProvisionConsumable`, //根据日志号查询准备耗材
      method: 'get',
      params: data
    })
  },
  inputResource(data) {
    return service({
      url: `/adscm/application/providerCollection/select/inputResource/selectInputResource`, //查询输入资源
      method: 'get',
      params: data
    })
  },
  precharge(data) {
    return service({
      url: `/adscm/application/providerCollection/select/precharge/selectPrecharge`, //查询预冲
      method: 'get',
      params: data
    })
  },
  parameterSettings(data) {
    return service({
      url: `/adscm/application/providerCollection/select/parameterSettings/selectParameterSettings`, //查询参数设置
      method: 'get',
      params: data
    })
  },
  inflating(data) {
    return service({
      url: `/adscm/application/providerCollection/select/inflating/selectInflating`, //查询加压
      method: 'get',
      params: data
    })
  },
  collectingPlasmaEnd(data) {
    return service({
      url: `/adscm/application/providerCollection/select/collectingPlasmaEnd/selectCollectingPlasmaEnd`, //查询采浆结束
      method: 'get',
      params: data
    })
  },
  uninstallConsumable(data) {
    return service({
      url: `/adscm/application/providerCollection/select/uninstallConsumable/selectUninstallConsumable`, //查询卸载耗材
      method: 'get',
      params: data
    })
  },
  selfCheck(data) {
    return service({
      url: `/adscm/application/providerCollection/select/selfCheck/selectSelfCheck`, //查询自检
      method: 'get',
      params: data
    })
  },
  providerCollectionProcess(data) {
    return service({
      url: `/adscm/application/providerCollection/select/providerCollectionProcess/selectProviderCollectionProcess`, //采浆过程概要
      method: 'get',
      params: data
    })
  },
  collectingPlasma(data) {
    return service({
      url: `/adscm/application/providerCollection/select/collectingPlasma/selectCollectingPlasma`, //采集环节
      method: 'get',
      params: data
    })
  },
  hsProcedure(data) {
    return service({
      url: `/adscm/application/providerCollection/select/hsProcedure/selectHsProcedure`, //还输过程信息
      method: 'get',
      params: data
    })
  },
  deviceException(data) {
    return service({
      url: `/adscm/application/providerCollection/select/deviceException/selectDeviceException`, //机器异常
      method: 'get',
      params: data
    })
  },
  consumableException(data) {
    return service({
      url: `/adscm/application/providerCollection/select/consumableException/selectConsumableException`, //耗材异常
      method: 'get',
      params: data
    })
  },
  donatorException(data) {
    return service({
      url: `/adscm/application/providerCollection/select/donatorException/selectDonatorException`, //浆员异常
      method: 'get',
      params: data
    })
  },
  pushButton(data) {
    return service({
      url: `/adscm/application/providerCollection/select/pushButton/selectPushButton`, //按键记录
      method: 'get',
      params: data
    })
  },
  priodic(data) {
    return service({
      url: `/adscm/application/providerCollection/select/periodic/selectPeriodic`, //周期性数据查询
      method: 'get',
      params: data
    })
  },
  selectProviderReg(registerNo) {
    return service({
      url: `/adscm/application/providerReg/selectProviderReg/${registerNo}`, //查询登记信息
      method: 'get'
    })
  },
  samplesList(data) {
    return service({
      url: `/adscm/application/plasmaSamples/queryByNameAndNo`, //获取检验记录列表
      method: 'get',
      params: data
    })
  },
  selectPrintList(data) {
    return service({
      url: `/adscm/application/plasmaSamples/selectPrintList`, //获取检验打印列表
      method: 'get',
      params: data
    })
  },
  plasmaSamplesUpdate(data) {
    return service({
      url: `/adscm/application/plasmaSamples/update`, //修改检验记录信息
      method: 'post',
      data
    })
  },
  /**新增角色 */
  addRole(data) {
    return service({
      url: `/adscm/system/role//addRole`,
      method: 'post',
      data
    })
  },
  /**角色编辑 */
  roleEdit(data,roleID) {
    return service({
      url: `/adscm/system/role/rolesMenus/${roleID}`,
      method: 'post',
      data
    })
  },
  /**用户管理 */
  allUserPage() {
    return service({
      url: `/adscm/system/user/allUserPage/1/1000000`,
      method: 'post',
    })
  },
  getUsersRoles(data,userId) {
    return service({
      url: `/adscm/system/user/usersRoles/${userId}`,
      method: 'post',
      data
    })
  },
  editUserPage(url,parms) {
    return service({
      url,
      method: 'post',
      parms
    })
  },
}